import React from "react";
import ReactDOM from "react-dom/client";
import AppRouter from "./router";
import { Provider } from "react-redux";
import { stores, persistor } from "./stores";
import { PersistGate } from 'redux-persist/lib/integration/react';
import "./index.less";

ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
  <React.StrictMode>
    <PersistGate loading={null} persistor={persistor}>
      <Provider store={stores}>
        <AppRouter />
      </Provider>
    </PersistGate>
  </React.StrictMode>
);
